/**
 * @Author: dn-jinmin
 * @File:  tlog
 * @Version: 1.0.0
 * @Date: 2024/3/11
 * @Description:
 */

package tlog

import (
	"runtime"
)

type LogFileLine struct{}

// 获取代码的执行行数
func getCallerFrame(skip int) (frame runtime.Frame, ok bool) {
	pc := make([]uintptr, 1)
	numFrames := runtime.Callers(skip, pc)
	if numFrames < 1 {
		return
	}

	frame, _ = runtime.CallersFrames(pc).Next()
	return frame, frame.PC != 0
}
